#pragma once

#include <list>
#include <vector>

using namespace std;

class CZheBanSort
{
public:
	CZheBanSort(void);
	~CZheBanSort(void);

public:
	void pushDataToPool(const int i);
	void eraseDataInPool(const int i);
	void clearDataPool();

	void DoSort();
	int GetList(list<int>& out_list);

private:
	void _DoSortLoop();
	void _DoSortWorker(const int i);

	void _FindPosAndInsert(const int i, const int arraysize, vector<int>::iterator itPos);

	void debugPrint();

private:
	vector<int> m_viPool;
	vector<int> m_vSortVector;
};

